<?php 
echo CHtml::link(Yii::t('main','Generate Acc'), array('payacc/generate','user_id'=>$model->user_id), array());
?>
<?php $this->widget('MyGridView', array(
	'id'=>'payacc-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'work_date',
		array(
			'name'=>'cost',
			'htmlOptions'=>array('class'=>'sum','id'=>'cost'),
			'footer'=>$model->getTotals()->cost, 			//'footer'=>$provider->itemCount===0 ? '' : $model->getTotals(),
			'footerHtmlOptions'=>array('class'=>'total2','id'=>'cost'),
		),
		array(
			'name'=>'service_id',
			'value'=>'Lookup::item("ServiceType",$data->service->type)',
			'filter'=>Lookup::items('ServiceType'),
		),
		'comment',
		array(
			'name'=>'is_active',
			'filter'=>Lookup::items('Boolean'),
		),
		/*
		'create_time',
		'update_time',
		*/
		array(
			'class'=>'CButtonColumn',
			'viewButtonUrl'=>'Yii::app()->createUrl("admin/payacc/view",array("id"=>$data->primaryKey))', 
			'updateButtonUrl'=>'Yii::app()->createUrl("admin/payacc/update",array("id"=>$data->primaryKey))',
			'deleteButtonUrl'=>'Yii::app()->createUrl("admin/payacc/delete",array("id"=>$data->primaryKey))',
		),
	),
)); ?>
